import React, { PureComponent } from "react";
import { connect } from "react-redux";
import { RecommendWrapper, RecommendItem } from "../style";

class Recommend extends PureComponent {
    constructor(props) {
        super(props);
    }
    render() {
        const { recommendList } = this.props;

        return (
            <RecommendWrapper>
                {recommendList.map(item => (
                    <RecommendItem
                        key={item.get("id")}
                        imgUrl={item.get("imgUrl")}>
                        {/* <p className="desc">{item.get("desc")}</p> */}
                    </RecommendItem>
                ))}
            </RecommendWrapper>
        );
    }
}

const mapStateToProps = state => ({
    recommendList: state.getIn(["home", "recommendList"])
});

const mapDispatchToProps = dispatch => ({});

export default connect(
    mapStateToProps,
    mapDispatchToProps
)(Recommend);
